<!-- 微社区父组件入口 -->
<template>
  <div id="Microhome" :class="[fun.isIphoneX() ? 'iphoneXStyle' : '']">
      <div class="microhome-icon" v-if="$route.name!=='microRelease'">
        <router-link :to="fun.getUrl('microRelease', {})"  tag="div" class="release">
          <i class="iconfont icon-fabu"></i>
          <span>发布</span>
        </router-link>
        <router-link :to="fun.getUrl('microhomepage', {})"  tag="div" class="home">
          <i class="iconfont icon-gerenzhuye"></i>
          <span>主页</span>
        </router-link>
      </div>
      <keep-alive>
        <router-view></router-view>
      </keep-alive>
  </div>
</template>

<script>
export default {
  data() {
    return {
      micro_style_type:null,//0样式一 |1样式二
    };
  },
  mounted(){
    // this.$route.meta.foot = false;
    // this.$emit("changeFoot", this.$route.meta.foot);
    // console.log(this.$route);
    this.getHomePageData();
  },
  methods:{
    getHomePageData(){
      $http.get("plugin.micro-communities.api.index.index",{},'').then(res=>{
        if(res.result){
          this.micro_style_type = res.data.set.micro_style_type;

        }
      })
    }

  }
};
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
.icon-fabu,.icon-gerenzhuye{
  margin-bottom: 0.1563rem;
  margin-top: 0.625rem;
}
.home{
  width: 3rem;
  height: 3rem;
  background: #FFFFFF;
  box-shadow: 0rem 0.0625rem 0.25rem 0.0313rem rgba(145,145,145,0.16);
  border-radius: 1.5rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  font-size: 0.625rem;
}
.release{
  width: 3rem;
  height: 3rem;
  background: #F15353;
  box-shadow: 0rem 0.0625rem 0.25rem 0.0313rem rgba(145,145,145,0.16);
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  margin-bottom: 0.7188rem;
  color:#fff;
  font-size: 0.625rem;
}
.microhome-icon {
  transform: translateX(-50%);
  position: fixed;
  right: 0px;
  bottom: 5.9688rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 999;
  transform: translateX(-1rem);
}

#Microhome.iphoneXStyle {
  padding-bottom: 4rem;
  position: relative;

}
.pcStyle .microhome-icon{
   width: 375px;
   right: unset;
}

#Microhome {
  min-height: 100vh;
  padding-bottom: 40px;
  position: relative;
}
</style>
